<div class="col-xs-12 pd-0">
	<input type="text" class="form-control" placeholder="Search..." [(ngModel)]="searchTerm" (keyup)="applySearchList();" />
</div>
<ul class="theme-list col-xs-12">
	<li class="list-item col-xs-12 list-title">Saved Queries</li>
	<li class="list-item col-xs-12" *ngFor="let query of filteredQuery, let i=index">
		<a class="col-xs-12 pd-0"  (click)="applyQuery(query);">
			<span class="col-xs-12 query-name">
				{{query.name}}
				<span class="pull-right">
					<time-relative [time]="query.createdAt"></time-relative>
				</span>
			</span>
			<span class="col-xs-12 query-info pd-0">
				<a class="pull-left m-r5" (click)="tagApply($event, query.tag, 'tag');">
					<span class="badge">{{query.tag}}</span>
				</a>
				<a class="pull-left" *ngIf="query.version" (click)="tagApply($event, query.version, 'version');">
					<span class="badge">{{query.version}}</span>
				</a>
			</span>
		</a>
		<a class="btn btn-grey delete-query" (click)="applyDeleteQuery(query);">
			<i class="fa fa-times"></i>
		</a>
	</li>
</ul>